/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 结构丰富的Person;

import java.util.Comparator;

/**
 * @Description 一个结构非常丰富的Person类！
 * @Author 俊昭
 * @Date 2022/5/10
 */
@MyAnnotation(value = "Hi")
public class Person extends Creature<String> implements Comparator<String>, MyInterface {
    public int id;
    int age;
    private String name;

    public Person() {
    }

    private Person(String name) {
        this.name = name;
    }

    @MyAnnotation(value = "abc")
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name, int age, int id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    @MyAnnotation
    private String show(String nation) {
        System.out.println("My nation is " + nation);
        return nation;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", age=" + age +
                ", name='" + name + '\'' +
                '}';
    }

    String display(String interests, int years)throws NullPointerException,ClassCastException {
        return interests + age;
    }
    private static void showDesc(){
        System.out.println("康胖子是个可爱的人");
    }

    @Override
    public int compare(String o1, String o2) {
        return 0;
    }

    @Override
    public void info() {
        System.out.println("I am A person !");
    }
}
